function eliminarElemento(id){
    var element = document.getElementById(id);
    if (!element){
        alert("El elemento de id: "+id+" no existe");
    } else {
        var padre = element.parentNode;
        padre.removeChild(element);
    }
}




function closeAutocompleteSelected(id_div){
    var div = document.getElementById(id_div);
    if(div){
        div.innerHTML = "";
        
        addInputAutocomplete(id_div);
    } else {
        alert('no encontrado : ' + id_div);
    }
    
}

function addInputAutocomplete(id_div){
    var div = document.getElementById(id_div);
    div.innerHTML="<input id=\"input_autocomplete_id\" type=\"text\" class=\"input_autocomplete_label\" />";
    document.getElementById("input_autocomplete_id").focus();
}